package com.thirdgroup.service.impl;

import com.thirdgroup.dao.PhoneBillDao;
import com.thirdgroup.dao.impl.PhoneBillDaoImpl;
import com.thirdgroup.pojo.vo.BillInfoVO;
import com.thirdgroup.service.PhoneBillService;
import com.thirdgroup.utils.respond.R;

import java.util.List;

public class PhoneBillServiceImpl implements PhoneBillService {
    private PhoneBillDao phoneBillDao=new PhoneBillDaoImpl();
    @Override
    public R selectUserPhone(String userPhone) {
        List<BillInfoVO> billInfoVOS = phoneBillDao.selectUserPhone(userPhone);
        System.out.println("进入电话号码所有账单---service");
        if (billInfoVOS != null &&!"".equals(billInfoVOS)){
            return R.ok(billInfoVOS);
        }
        System.out.println("系统繁忙，请稍后再试~");
        return R.error(500,"系统繁忙，请稍后再试~");
    }
}
